home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 4
/
Precision Software Applications Silver Collection Volume 4 (1993).iso
/
database
/
wssi522b.exe
/
PSTSCRPT.DEF
< prev
next >
Wrap
Text File
|
1992-02-23
|
5KB
|
96 lines
Printer definition file for WSSINDEX custom print utility
All lines of this file are comments until a line beginning ----. After that,
alternate lines are comments and parameters. See the WSSINDEX documentation
for a description of the format allowed here. The codes in this file are for
a generic postscript printer, but you may alter these to suit your needs.
Some items which you might expect to control in this file, such as font size
and portrait or landscape orientation are instead built into Wssindex. The
complex commands which do appear in this file relate to disk covers. They are
made harder to read by the need to represent blank by \s and escape numbers so
that they are interpreted as character.
This definition file has been tested using a QMS Jetscript board driving a
Canon engine.
Command to advance to next cover, after translation, is
currentpoint exch pop 396 lt {p}{0 -18 rmoveto}ifelse
This means
1. stack the x-y coordinates of the current position
2. exchange the coordinates just stacked
3. throw away one of them (x)
4. test if y is less than 396, which is the middle of the page for 11
inch paper (72 points/inch * 11 inches / 2)
5. if y is less than 396, more than half the page has been used, so
execute macro p (defined elsewhere) which starts a new page, otherwise
move down 18 points (0.25") from the current line
The numbers 396 and 18 might reasonably be adjusted. If you are trying to
fit more than 2 covers on a page, note that the y coordinate 0 is at the bottom
of the page, so for 3 covers, 396 would be replaced by approximately 264.
When the disk cover box forming characters are printed, the fontsize has
already been put on the postscript stack. Commands here are bracketed by
gsave ... stroke grestore before being sent to the printer, so scaling and
line width adjustments apply only to the box border. Looking at the top left
hand corner character as a typical example, the translated command is
dup scale .1 setlinewidth .5 0 rmoveto 0 .5 rlineto 1 0 rlineto
which means
1. duplicate the fontsize number already stacked and use it as an overall
scale factor for the lines generating the box. (x and y can be scaled
independently, but there's no reason to do that here.)
2. set the line width to one tenth point (times the font size scale factor)
3. move to lower middle of character box, draw two lines making up the
corner of the box. The box you are drawing is is effectively 1x1 and
initially the "pen" is at the lower left.
Probably the only thing you might want to change here is the line width.
With 90-character wide by 45-character high covers, a font size which works
well is 7 points with 1 point extra spacing. Enter these numbers on the
postscript printer setup menu in Wssindex.
------------------------------------------------------------
Printer name
Postscript printer
Optional string printed on all labels
Property of <your name here>
Printer initialization command for 1,2,... column printing, 50 max
Printer initialization command for labels, 50 max (pitch, line spacing, etc.)
Printer initialization command for disk covers, 50 max
Printer deinitialization command, 10 max (form feed for laser printer, etc.)
Number of spaces in left margin for labels
5
Number of columns for labels
1
Width of labels (characters)
50
Number of characters between labels (if multiple columns)
5
Length of label in lines (including unusable lines)
12
Number of usable lines for label
9
Number of spaces in left margin for disk covers
10
Width of paper for disk covers (characters)
90
Length of page in lines for disk covers
45
Printer command to position for the next disk cover
currentpoint \s exch \s pop \s \3\9\6 \s lt \s { p } {\0 \s -\1\8 \s rmoveto} ifelse
Character to use for sides of disk cover box (use only "pop" to omit border)
dup \s scale \s .\1 \s setlinewidth \s .\5 \s \0 \s rmoveto \s \0 \s \1 \s rlineto
Character to use for top and bottom lines
dup \s scale \s .\1 \s setlinewidth \s \0 \s .\5 \s rmoveto \s \1 \s \0 \s rlineto
Character to use for top left corner
dup \s scale \s .\1 \s setlinewidth \s .\5 \s \0 \s rmoveto \s \0 \s .\5 \s rlineto \s \1 \s \0 \s rlineto
Character to use for top right corner
dup \s scale \s .\1 \s setlinewidth \s \0 \s .\5 \s rmoveto \s .\5 \s \0 \s rlineto \s \0 \s -.\5 \s rlineto
Character to use for bottom left corner
dup \s scale \s .\1 \s setlinewidth \s .\5 \s \1 \s rmoveto \s \0 \s -.\5 \s rlineto \s .\5 \s \0 \s rlineto
Character to use for bottom right corner
dup \s scale \s .\1 \s setlinewidth \s \0 \s .\5 \s rmoveto \s .\5 \s \0 \s rlineto \s \0 \s .\5 \s rlineto
End of printer configuration file